﻿ 
<?php 

setcookie('cookie1','value1',time()+60,'/','htaphp.com');
setcookie('cookie2','value2');
//函数原型:int setcookie(string name,string value,int expire,string path,string domain,int secure)
//echo($mycookie);
//echo($HTTP_COOKIE_VARS['mycookie']);
echo($_COOKIE['cookie1']);
echo($_COOKIE['cookie2']);


?> 

<script>
	
	console.log(document.cookie);

	document.cookie="cookie2=value3";

</script>